package com.meida.module.bus.provider.handler;

import cn.hutool.core.util.StrUtil;
import com.meida.common.mybatis.entity.EntityMap;
import com.meida.common.mybatis.interceptor.ExportInterceptor;
import com.meida.common.mybatis.model.ResultBody;
import com.meida.module.bus.client.entity.BusMaterialPlan200;
import com.meida.module.bus.provider.service.BusMaterialPlan200Service;
import com.meida.module.bus.provider.utils.CommonUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

@Component("busmaterialPlan200ExportHandler")
public class BusmaterialPlan200ExportHandler implements ExportInterceptor<BusMaterialPlan200> {
    @Autowired
    private BusMaterialPlan200Service busMaterialPlan200Service;

    @Override
    public ResultBody initData(Map params) {
        List<EntityMap> busMaterialPlan200List = busMaterialPlan200Service.initDataplans(params);
        for (EntityMap map :busMaterialPlan200List) {
            map.put("isAdd","否");
            CommonUtil.setSelectedMap(map);
        }
        return ResultBody.ok(busMaterialPlan200List);
    }
}



